.class public Lcom/donson/momark/view/e;
.super Landroid/widget/RelativeLayout;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Landroid/content/Context;

.field private d:Lcom/donson/momark/view/view/s;

.field private e:Z

.field private g:Lcom/donson/momark/view/view/AdView;

.field private h:Lcom/donson/momark/view/view/z;

.field private j:Landroid/widget/RelativeLayout$LayoutParams;

.field private w:Lcom/donson/momark/view/view/k;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/donson/momark/view/view/AdView;)V
    .locals 1

    invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/donson/momark/view/e;->e:Z

    iput-object p1, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    iput-object p2, p0, Lcom/donson/momark/view/e;->g:Lcom/donson/momark/view/view/AdView;

    invoke-virtual {p0}, Lcom/donson/momark/view/e;->a()V

    return-void
.end method


# virtual methods
.method public a()V
    .locals 4

    const/4 v3, -0x1

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    iget-object v1, p0, Lcom/donson/momark/view/e;->g:Lcom/donson/momark/view/view/AdView;

    invoke-virtual {v1}, Lcom/donson/momark/view/view/AdView;->getAdWidth()I

    move-result v1

    div-int/lit8 v1, v1, 0x2

    const/16 v2, 0x3c

    invoke-direct {v0, v1, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    const/16 v1, 0x11

    iput v1, v0, Landroid/widget/LinearLayout$LayoutParams;->gravity:I

    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v0, v3, v3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    iput-object v0, p0, Lcom/donson/momark/view/e;->j:Landroid/widget/RelativeLayout$LayoutParams;

    iget-object v0, p0, Lcom/donson/momark/view/e;->j:Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v1, 0x1

    iput-boolean v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->alignWithParent:Z

    new-instance v0, Lcom/donson/momark/view/view/z;

    iget-object v1, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/donson/momark/view/view/z;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/donson/momark/view/e;->h:Lcom/donson/momark/view/view/z;

    iget-object v0, p0, Lcom/donson/momark/view/e;->h:Lcom/donson/momark/view/view/z;

    invoke-virtual {v0, p0}, Lcom/donson/momark/view/view/z;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

.method public a(Lcom/donson/momark/a/r;Lcom/donson/momark/a/r;)V
    .locals 10

    const/4 v9, -0x1

    const/4 v8, 0x0

    const/4 v7, 0x1

    iget-object v0, p1, Lcom/donson/momark/a/r;->h:Lcom/donson/momark/a/a/w;

    invoke-virtual {v0, v7}, Lcom/donson/momark/a/a/w;->a(I)V

    iget-object v0, p2, Lcom/donson/momark/a/r;->h:Lcom/donson/momark/a/a/w;

    invoke-virtual {v0, v7}, Lcom/donson/momark/a/a/w;->a(I)V

    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    invoke-virtual {v0}, Lcom/donson/momark/view/view/s;->removeAllViews()V

    :cond_0
    iget-object v0, p1, Lcom/donson/momark/a/r;->d:Lcom/donson/momark/a/a/u;

    invoke-virtual {v0}, Lcom/donson/momark/a/a/u;->g()Landroid/widget/ImageView;

    move-result-object v0

    iget-object v1, p1, Lcom/donson/momark/a/r;->d:Lcom/donson/momark/a/a/u;

    invoke-virtual {v1}, Lcom/donson/momark/a/a/u;->h()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v1, p0, Lcom/donson/momark/view/e;->h:Lcom/donson/momark/view/view/z;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/donson/momark/view/view/z;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    new-instance v0, Lcom/donson/momark/view/view/k;

    iget-object v1, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/donson/momark/view/view/k;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/donson/momark/view/e;->w:Lcom/donson/momark/view/view/k;

    invoke-virtual {p0}, Lcom/donson/momark/view/e;->removeAllViews()V

    iget-object v0, p1, Lcom/donson/momark/a/r;->e:Lcom/donson/momark/a/a/a;

    invoke-virtual {v0}, Lcom/donson/momark/a/a/a;->h()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    :pswitch_0
    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    invoke-virtual {v0}, Lcom/donson/momark/view/view/s;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    invoke-virtual {v0}, Lcom/donson/momark/view/view/s;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout;

    iget-object v1, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout;->removeView(Landroid/view/View;)V

    :cond_1
    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    iget-object v2, p0, Lcom/donson/momark/view/e;->g:Lcom/donson/momark/view/view/AdView;

    invoke-virtual {v2}, Lcom/donson/momark/view/view/AdView;->getAdHeight()I

    move-result v2

    iget-object v3, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-static {v3, v7}, Lcom/donson/momark/util/u;->a(Landroid/content/Context;I)I

    move-result v3

    sub-int/2addr v2, v3

    invoke-direct {v1, v9, v2}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v0, v1}, Lcom/donson/momark/view/e;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/donson/momark/view/e;->h:Lcom/donson/momark/view/view/z;

    invoke-virtual {v0}, Lcom/donson/momark/view/view/z;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/donson/momark/view/e;->h:Lcom/donson/momark/view/view/z;

    invoke-virtual {v0}, Lcom/donson/momark/view/view/z;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout;

    iget-object v1, p0, Lcom/donson/momark/view/e;->h:Lcom/donson/momark/view/view/z;

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout;->removeView(Landroid/view/View;)V

    :cond_2
    const/16 v0, 0x86

    const/16 v1, 0xe0

    invoke-static {v8, v0, v1}, Landroid/graphics/Color;->rgb(III)I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/donson/momark/view/e;->setBackgroundColor(I)V

    iget-object v0, p0, Lcom/donson/momark/view/e;->h:Lcom/donson/momark/view/view/z;

    iget-object v1, p0, Lcom/donson/momark/view/e;->j:Landroid/widget/RelativeLayout$LayoutParams;

    invoke-virtual {p0, v0, v1}, Lcom/donson/momark/view/e;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    return-void

    :pswitch_1
    const-string v0, "viewmanager.refreshpic"

    const-string v1, "-------------------------------pictext"

    invoke-static {v0, v1}, Lcom/donson/momark/util/t;->d(Ljava/lang/String;Ljava/lang/String;)V

    new-instance v1, Lcom/donson/momark/util/q;

    iget-object v0, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v1, v0}, Lcom/donson/momark/util/q;-><init>(Landroid/content/Context;)V

    invoke-virtual {v1, v9}, Lcom/donson/momark/util/q;->setTextColor(I)V

    iget-object v0, p1, Lcom/donson/momark/a/r;->e:Lcom/donson/momark/a/a/a;

    invoke-virtual {v0}, Lcom/donson/momark/a/a/a;->w()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, v8}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/CharSequence;

    invoke-virtual {v1, v0}, Lcom/donson/momark/util/q;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {v1, v7}, Lcom/donson/momark/util/q;->setSingleLine(Z)V

    invoke-virtual {v1}, Lcom/donson/momark/util/q;->getPaint()Landroid/text/TextPaint;

    move-result-object v0

    invoke-virtual {v0, v7}, Landroid/text/TextPaint;->setFakeBoldText(Z)V

    sget-object v0, Landroid/text/TextUtils$TruncateAt;->MARQUEE:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v1, v0}, Lcom/donson/momark/util/q;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    const/16 v0, 0x3e8

    invoke-virtual {v1, v0}, Lcom/donson/momark/util/q;->setMarqueeRepeatLimit(I)V

    new-instance v2, Landroid/widget/TextView;

    iget-object v0, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v2, v0}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iget-object v0, p1, Lcom/donson/momark/a/r;->e:Lcom/donson/momark/a/a/a;

    invoke-virtual {v0}, Lcom/donson/momark/a/a/a;->w()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/CharSequence;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p1, Lcom/donson/momark/a/r;->j:Lcom/donson/momark/a/q;

    invoke-virtual {v0}, Lcom/donson/momark/a/q;->a()Landroid/widget/ImageView;

    move-result-object v0

    iget-object v3, p1, Lcom/donson/momark/a/r;->j:Lcom/donson/momark/a/q;

    invoke-virtual {v3}, Lcom/donson/momark/a/q;->j()Landroid/graphics/Bitmap;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    new-instance v3, Landroid/widget/ImageView;

    iget-object v4, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v3, v4}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v3, v0}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    iget-object v0, p1, Lcom/donson/momark/a/r;->j:Lcom/donson/momark/a/q;

    invoke-virtual {v0}, Lcom/donson/momark/a/q;->d()Landroid/widget/ImageView;

    move-result-object v0

    iget-object v4, p1, Lcom/donson/momark/a/r;->j:Lcom/donson/momark/a/q;

    invoke-virtual {v4}, Lcom/donson/momark/a/q;->b()Landroid/graphics/Bitmap;

    move-result-object v4

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    new-instance v4, Landroid/widget/ImageView;

    iget-object v5, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v4, v5}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v4, v0}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    new-instance v0, Lcom/donson/momark/view/q;

    iget-object v5, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v0, v5}, Lcom/donson/momark/view/q;-><init>(Landroid/content/Context;)V

    new-instance v5, Lcom/donson/momark/view/view/o;

    iget-object v6, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v5, v6, p1}, Lcom/donson/momark/view/view/o;-><init>(Landroid/content/Context;Lcom/donson/momark/a/r;)V

    iput-object v5, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    iget-object v5, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    const/4 v6, 0x5

    new-array v6, v6, [Ljava/lang/Object;

    aput-object v3, v6, v8

    aput-object v1, v6, v7

    const/4 v1, 0x2

    aput-object v2, v6, v1

    const/4 v1, 0x3

    aput-object v4, v6, v1

    const/4 v1, 0x4

    aput-object v0, v6, v1

    invoke-virtual {v5, v6}, Lcom/donson/momark/view/view/s;->a([Ljava/lang/Object;)V

    iget-object v0, p1, Lcom/donson/momark/a/r;->j:Lcom/donson/momark/a/q;

    invoke-virtual {v0}, Lcom/donson/momark/a/q;->e()Landroid/widget/ImageView;

    move-result-object v0

    iget-object v1, p1, Lcom/donson/momark/a/r;->j:Lcom/donson/momark/a/q;

    invoke-virtual {v1}, Lcom/donson/momark/a/q;->w()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v1, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/donson/momark/view/view/s;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    invoke-virtual {v0, v8}, Lcom/donson/momark/view/view/s;->a(Z)V

    goto/16 :goto_0

    :pswitch_2
    iget-object v0, p1, Lcom/donson/momark/a/r;->e:Lcom/donson/momark/a/a/a;

    invoke-virtual {v0}, Lcom/donson/momark/a/a/a;->c()Z

    move-result v0

    if-eqz v0, :cond_3

    const-string v0, "viewmanager.refreshpic"

    const-string v1, "-------------------------------gif"

    invoke-static {v0, v1}, Lcom/donson/momark/util/t;->d(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p1, Lcom/donson/momark/a/r;->j:Lcom/donson/momark/a/q;

    invoke-virtual {v0}, Lcom/donson/momark/a/q;->h()Lcom/donson/momark/view/view/v;

    move-result-object v0

    new-instance v1, Lcom/donson/momark/view/view/t;

    iget-object v2, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v1, v2, p1}, Lcom/donson/momark/view/view/t;-><init>(Landroid/content/Context;Lcom/donson/momark/a/r;)V

    iput-object v1, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    iget-object v1, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    new-array v2, v7, [Ljava/lang/Object;

    aput-object v0, v2, v8

    invoke-virtual {v1, v2}, Lcom/donson/momark/view/view/s;->a([Ljava/lang/Object;)V

    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    invoke-virtual {v0, v8}, Lcom/donson/momark/view/view/s;->a(Z)V

    goto/16 :goto_0

    :cond_3
    const-string v0, "viewmanager.refreshpic"

    const-string v1, "-------------------------------pic"

    invoke-static {v0, v1}, Lcom/donson/momark/util/t;->d(Ljava/lang/String;Ljava/lang/String;)V

    new-instance v0, Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iget-object v1, p1, Lcom/donson/momark/a/r;->j:Lcom/donson/momark/a/q;

    invoke-virtual {v1}, Lcom/donson/momark/a/q;->w()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    new-instance v1, Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    new-instance v0, Lcom/donson/momark/view/view/u;

    iget-object v2, p0, Lcom/donson/momark/view/e;->a:Landroid/content/Context;

    invoke-direct {v0, v2, p1}, Lcom/donson/momark/view/view/u;-><init>(Landroid/content/Context;Lcom/donson/momark/a/r;)V

    iput-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    new-array v2, v7, [Ljava/lang/Object;

    aput-object v1, v2, v8

    invoke-virtual {v0, v2}, Lcom/donson/momark/view/view/s;->a([Ljava/lang/Object;)V

    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    invoke-virtual {v0, v8}, Lcom/donson/momark/view/view/s;->a(Z)V

    goto/16 :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_2
        :pswitch_0
    .end packed-switch
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1

    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    instance-of v0, v0, Lcom/donson/momark/view/view/o;

    if-eqz v0, :cond_1

    iget-object p0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    check-cast p0, Lcom/donson/momark/view/view/o;

    invoke-virtual {p0}, Lcom/donson/momark/view/view/o;->e()V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    instance-of v0, v0, Lcom/donson/momark/view/view/u;

    if-eqz v0, :cond_2

    iget-object p0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    check-cast p0, Lcom/donson/momark/view/view/u;

    invoke-virtual {p0}, Lcom/donson/momark/view/view/u;->d()V

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    instance-of v0, v0, Lcom/donson/momark/view/view/t;

    if-eqz v0, :cond_0

    iget-object p0, p0, Lcom/donson/momark/view/e;->d:Lcom/donson/momark/view/view/s;

    check-cast p0, Lcom/donson/momark/view/view/t;

    invoke-virtual {p0}, Lcom/donson/momark/view/view/t;->d()V

    goto :goto_0
.end method
